<template>
  <div class="dialog-bg">
    <div class="dialog-view">
      <div class="title">
        <span>機器登録</span>
        <i class="el-icon-close" @click="$emit('CloseAddBasicStyle')"></i>
      </div>
      <div class="dialog-wrapper">
        <el-form :model="ruleForm" ref="ruleForm" label-width="110px" class="demo-ruleForm">
          <el-form-item label="機器番号：" prop="name" :rules="{
            required: true,
            message: '空にはできません',
            trigger: 'blur',
          }">
            <el-input v-model="ruleForm.name" class="form-ipt" size="small"></el-input>
          </el-form-item>
          <el-form-item label="機器名称：" prop="value" :rules="{
            required: true,
            message: '空にはできません',
            trigger: 'blur',
          }">
            <el-input v-model="ruleForm.value" class="form-ipt" size="small"></el-input>
          </el-form-item>
          <el-form-item label="カテゴリー：" prop="name" :rules="{
            required: true,
            message: '空にはできません',
            trigger: 'blur',
          }">
            <el-input v-model="ruleForm.name" class="form-ipt" size="small"></el-input>
          </el-form-item>
        </el-form>
      </div>
      <div class="footer">
        <button @click="$emit('CloseAddBasicStyle')">Cancel</button>
        <button>OK</button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "template",
  data() {
    return {
      ruleForm: {
        name: "",
        value: "",
      },
    };
  },
  components: {},
  watch: {},
  methods: {},
  created() { },
  mounted() { },
  beforeDestroy() { },
  destroyed() { },
};
</script>
<style lang="scss" scoped>
.dialog-bg {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 6;

  .dialog-view {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 488px;
    height: 283px;
    background: #ffffff;
    box-shadow: 0px 12px 48px 16px rgba(0, 0, 0, 0.05),
      0px 9px 28px 0px rgba(0, 0, 0, 0.08),
      0px 6px 16px -8px rgba(0, 0, 0, 0.15);

    .title {
      width: 100%;
      height: 42px;
      padding: 0 24px;
      border-bottom: 1px solid #f0f0f0;
      display: flex;
      align-items: center;
      justify-content: space-between;

      span {
        font-size: 16px;
        font-weight: bold;
      }

      .el-icon-close {
        cursor: pointer;
        font-size: 16px;
      }
    }

    .dialog-wrapper {
      width: 100%;
      padding: 24px 24px 0 10px;

      ::v-deep .el-input--small .el-input__inner {
        background: #ffdeac;
      }

      .el-form-item {
        margin-bottom: 12px;
      }
    }

    .footer {
      width: 100%;
      padding: 0 24px;
      display: flex;
      align-items: center;
      justify-content: flex-end;

      button {
        width: 82px;
        height: 32px;
        background: #ffffff;
        border: 1px solid #d9d9d9;
        border-radius: 4px;
        margin-left: 16px;
      }

      button:nth-child(2) {
        background: #106EBE;
        color: #fff;
      }
    }
  }
}
</style>
